package cn.iocoder.yudao.server.config;

import cn.iocoder.yudao.framework.datapermission.core.rule.store.StoreDataPermissionRuleCustomizer;
import cn.iocoder.yudao.module.trade.dal.dataobject.delivery.DeliveryPickUpStoreDO;
import cn.iocoder.yudao.module.trade.dal.dataobject.order.TradeOrderDO;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * system 模块的数据权限 Configuration
 *
 * @author 万民匠心
 */
@Configuration(proxyBeanMethods = false)
public class StoreDataPermissionConfiguration {

    @Bean
    public StoreDataPermissionRuleCustomizer sysStoreDataPermissionRuleCustomizer() {
        return rule -> {
            rule.addStoreColumn(TradeOrderDO.class);
            rule.addStoreColumn(DeliveryPickUpStoreDO.class);
        };
    }

}
